home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Atlanta_1990 / Atlanta-Devcon.2 / Libraries / IFFParse / Examples / iffparse_protos.h next >
Encoding:
C/C++ Source or Header  |  1992-08-26  |  3.1 KB  |  65 lines

  1. #ifndef  CLIB_IFFPARSE_PROTO_H
  2. #define  CLIB_IFFPARSE_PROTO_H
  3. /* "iffparse.library" */
  4. /*------ Basic functions ------*/
  5. struct IFFHandle *AllocIFF( void );
  6. LONG OpenIFF( struct IFFHandle *iff, LONG rwMode );
  7. LONG ParseIFF( struct IFFHandle *iff, LONG control );
  8. void CloseIFF( struct IFFHandle *iff );
  9. void FreeIFF( struct IFFHandle *iff );
  10. /*------ Read/Write functions ------*/
  11. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, LONG size );
  12. LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, LONG size );
  13. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, LONG bytesPerRecord,
  14.     LONG nRecords );
  15. LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, LONG bytesPerRecord,
  16.     LONG nRecords );
  17. /*------ Context entry/exit ------*/
  18. LONG PushChunk( struct IFFHandle *iff, LONG type, LONG id, LONG size );
  19. LONG PopChunk( struct IFFHandle *iff );
  20. /*------ Low-level handler installation ------*/
  21. LONG EntryHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position,
  22.     struct Hook *handler, APTR object );
  23. LONG ExitHandler( struct IFFHandle *iff, LONG type, LONG id, LONG position,
  24.     struct Hook *handler, APTR object );
  25. /*------ Built-in chunk/property handlers ------*/
  26. LONG PropChunk( struct IFFHandle *iff, LONG type, LONG id );
  27. LONG PropChunks( struct IFFHandle *iff, LONG *propArray, LONG nProps );
  28. LONG StopChunk( struct IFFHandle *iff, LONG type, LONG id );
  29. LONG StopChunks( struct IFFHandle *iff, LONG *propArray, LONG nProps );
  30. LONG CollectionChunk( struct IFFHandle *iff, LONG type, LONG id );
  31. LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray, LONG nProps );
  32. LONG StopOnExit( struct IFFHandle *iff, LONG type, LONG id );
  33. /*------ Context utilities ------*/
  34. struct StoredProperty *FindProp( struct IFFHandle *iff, LONG type, LONG id );
  35. struct CollectionItem *FindCollection( struct IFFHandle *iff, LONG type,
  36.     LONG id );
  37. struct ContextNode *FindPropContext( struct IFFHandle *iff );
  38. struct ContextNode *CurrentChunk( struct IFFHandle *iff );
  39. struct ContextNode *ParentChunk( struct ContextNode *contextNode );
  40. /*------ LocalContextItem support functions ------*/
  41. struct LocalContextItem *AllocLocalItem( LONG type, LONG id, LONG ident,
  42.     LONG dataSize );
  43. APTR LocalItemData( struct LocalContextItem *localItem );
  44. void SetLocalItemPurge( struct LocalContextItem *localItem,
  45.     struct Hook *purgeHook );
  46. void FreeLocalItem( struct LocalContextItem *localItem );
  47. struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, LONG type,
  48.     LONG id, LONG ident );
  49. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalItem *localItem,
  50.     LONG position );
  51. void StoreItemInContext( struct IFFHandle *iff, struct LocalItem *localItem,
  52.     struct ContextNode *contextNode );
  53. /*------ IFFHandle initialization ------*/
  54. void InitIFF( struct IFFHandle *iff, LONG flags, struct Hook *streamHook );
  55. void InitIFFasDOS( struct IFFHandle *iff );
  56. void InitIFFasClip( struct IFFHandle *iff );
  57. /*------ Internal clipboard support ------*/
  58. struct ClipboardHandle *OpenClipboard( LONG unitNum );
  59. void CloseClipboard( struct ClipboardHandle *clipboard );
  60. /*------ Miscellaneous ------*/
  61. LONG GoodID( LONG id );
  62. LONG GoodType( LONG type );
  63. char *IDtoStr( LONG id, char *buf );
  64. #endif   /* CLIB_IFFPARSE_PROTO_H */
  65.